<!doctype html>
<html >
<head>
<include file="Public:headinc" />

<link href="<?php echo MY_CDN;?>/css/avatar-swfupload.css" rel="stylesheet" />
<link rel="stylesheet" href="<?php echo MY_CDN;?>/admin/css/postinfo.css"/>
<style>
#overview {margin-top:6px;}
#overview img {width:100px; margin-left:3px;}
</style>
</head>
<body>
	<!-- container -->
	<div style="margin-top:22px;">
	<form id="f1" method="post" action="{:U('Article/doEditArticle')}">
		<table width="100%">
		<tr>
			<td class="y-alignRight">类别<span class="y-highlight">*</span>：</td>
			<td class="y-alignLeft">
			<select name="articletypeid" id="articletypeid">
<php>
if(is_array($types)){
foreach($types as $val) {
</php>
<option value="{$val['id']}" <?php if($data['articletypeid']==$val['id'])echo 'selected="selected"'; ?>>{$val['typename']}</option>
<php> }} </php>			
			</select>
			</td>
		</tr>
		<tr>
			<td class="y-alignRight">是否推荐：</td>
			<td class="y-alignLeft">
			<select name="isrecommend" id="isrecommend">
			<option value="0" <?php if($data['isrecommend']=='0')echo 'selected="selected"'; ?> >不推荐</option>
			<option value="1" <?php if($data['isrecommend']=='1')echo 'selected="selected"'; ?>>推荐</option>
			</select>
			</td>
		</tr>
		<tr>
			<td class="y-alignRight">标题<span class="y-highlight">*</span>：</td>
			<td class="y-alignLeft">
			<input type="text" name="title" id="title" class="input-xlarge uneditable" maxlength="100" value="{$data['title']}"/>
			</td>
		</tr>
		<tr>
			<td class="y-alignRight">作者：</td>
			<td class="y-alignLeft">
			<input type="text" name="author" id="author" class="input-xlarge uneditable" maxlength="100" value="{$data['author']}"/>
			</td>
		</tr>
		<tr>
			<td class="y-alignRight">标签：</td>
			<td class="y-alignLeft">
			<input type="text" name="tags" id="tags" class="input-xlarge uneditable" maxlength="100" value="{$data['tags']}"/> 多个用竖线 | 分隔
			</td>
		</tr>
		<tr>
			<td class="y-alignRight">预览图：</td>
			<td class="y-alignLeft">
				<span id="uploadMsg"></span>  <!-- error message -->
				<div class="swf-fieldset" id="fsUploadProgress"></div>
				<span id="spanButtonPlaceHolder"></span>
				<div><input type="button" value="上传" class="btn btn-inverse" id="uploadBtn" onclick="myStartQueue()"/>上传200K以内的图片 留空表示不修改</div>
				<!-- 图片保存区 -->
				<div><input type="text" name="viewimage" id="viewimage" class="input-xlarge"/>图片地址，上传图片后自动填充，自己填写地址请以&nbsp;<span style="font-weight:bold;color:red;font-size:14px;">. /Upload</span>&nbsp;开头</div>
				<div id="overview" ></div>
			</td>
		</tr>
		<tr>
			<td class="y-alignRight">描述：</td>
			<td class="y-alignLeft">
				<textarea id="description" name="description" class="input-xxlarge" rows="4" maxlength="120">{$data['description']}</textarea>
			</td>
		</tr>
		<tr>
			<td class="y-alignRight">详细<span class="y-highlight">*</span>：</td>
			<td class="y-alignLeft">
				<textarea id="content" name="content">{$data['content']}</textarea>
			</td>
		</tr>
		<tr>
			<td class="y-alignRight"><input type="hidden" name="pkid" value="{$data['id']}"></td>
			<td class="y-alignLeft">
				<input type="button" class="btn btn-inverse" value="发布" onclick="doPost()"/>
			</td>
		</tr>
		</table>
	</form>
	</div>
	<!-- // container -->

<!-- swf -->
<script type="text/javascript" src="<?php echo MY_CDN;?>/js/swfupload/swfuplaod-total.js"></script>
<!-- 引入ckeditor -->
<script charset="utf-8" src="<?php echo MY_CDN;?>/js/ckeditor422/ckeditor.js"></script>		

<script charset="utf-8" src="<?php echo MY_CDN;?>/admin/js/editArticle.js"></script>
</body>
</html>